package com.cskaoyan.controller.wx;

import com.cskaoyan.bean.BaseRespVo;
import com.cskaoyan.bean.Region;
import com.cskaoyan.service.wx.WxRegionService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @author heyyon
 */
@RestController
@RequestMapping("wx/region")
public class WxRegionController {
    @Autowired
    WxRegionService wxRegionService;
    @RequestMapping("list")
    public BaseRespVo list(Integer pid) {
        List<Region> regions = wxRegionService.list(pid);
        return BaseRespVo.ok(regions);
    }
}
